<template>
  <div class="finishgoods">
    <h3>订单详情——已发货</h3>
    <div class="orderinfo">
      <el-table :data="tableData" stripe style="width: 100%">
        <el-table-column prop="id" label="订单编号" width="180" />
        <el-table-column prop="name" label="订单商品" width="180" />
        <el-table-column prop="price" label="订单金额" width="180" />
      </el-table>
      <el-table :data="tableData" stripe style="width: 100%">
        <el-table-column prop="date" label="下单时间" width="180" />
        <el-table-column prop="phone" label="用户账号" width="180"/>
        <el-table-column prop="way" label="支付方式" width="180"/>
      </el-table>
      <el-button type="primary" class="btn" @click="$router.go(-1)">返回</el-button>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
//实例化路由管理对象
var $router = useRouter();

import {useRoute} from 'vue-router'
// 实例化路由对象(包含当前路由的详细信息)
var $route = useRoute();

import {onMounted,reactive} from 'vue'
var tableData = reactive([])

// console.log("搜索",JSON.parse($route.query))
onMounted(() => {
  tableData.push(JSON.parse($route.query.id))
  console.log(tableData)
})

</script>

<style>
.el-main>.finishgoods{
  margin: 60px 100px;
}
.el-main>.finishgoods>h3{
  line-height: 50px;
}
.el-main>.finishgoods>.orderinfo{
  width: 500px;
  position: relative;
}
.el-main>.finishgoods>.orderinfo>.btn{
  position: absolute;
  bottom: -80px;
  right: 100px;
}
</style>